import numpy as np

x = np.arange(6).reshape(3,2)
print(x)
'''
[[0 1]
 [2 3]
 [4 5]]
'''

# 1.flatten 按行 转 1维数组
a = x.flatten()
print(a)
'''
[0 1 2 3 4 5]
'''

# 2.flatten 按列 转 1维数组
b = x.flatten(order='F')
print(b)
'''
[0 2 4 1 3 5]
'''